import { ApiProperty } from '@nestjs/swagger';

export class LoginDto {
  @ApiProperty({
    description: '用户名',
    example: 'admin',
    required: true,
  })
  username: string;

  @ApiProperty({
    description: '密码',
    example: 'password123',
    required: true,
    format: 'password',
  })
  password: string;
}

export class LoginResponseDto {
  @ApiProperty({
    description: '访问令牌',
    example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
  })
  access_token: string;

  @ApiProperty({
    description: '用户信息',
  })
  user: {
    id: number;
    username: string;
    // 其他用户字段
  };
}